import React from 'react';
import {
    NavLink
} from 'react-router-dom'
class SiderNav extends React.Component {
    constructor(props){
        super(props)

    }
    render(){

        const {routes}=this.props
        return (
            <div style={{'height':'100%'}} className="pos-abs">
                    
                        <ul className="vertical-menu">
                                {routes.map((e,i)=> <NavLink  activeClassName="vertical-menu-item-active" className="vertical-menu-item" key={i} exact to={e.routes?e.routes[0].path:e.path}>{e.name}</NavLink>)}
                        </ul>
                
            </div>
        )
    }
}

export default SiderNav